<template>
  <div class="father">
      <h2>父组件</h2>
      <h3 v-if="childToy">我收到了玩具: {{ childToy }}</h3>
      <Child  />
      <div style="height: 100px;"></div>
      <Child2 />
  </div>
</template>

<script setup lang="ts">
import Child from './Child.vue'
import Child2 from './Child2.vue'
import { ref } from 'vue'

const childToy = ref('')

</script>

<style scoped>
.father {
  padding: 20px;
  background-color: rgb(165, 164, 164);
  border-radius: 10px;
}
</style>